<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<!DOCTYPE html>
<html>
	<head>
		<title>编辑早教中心</title>
		<meta name="decorator" content="default"/>
		<script type="text/javascript">
			$(function() {
				//初始化表单验证
				$("#inputForm").initValidform();
				
				    //$(".upload-img").InitUploader({ type:'article', filesize: "", sendurl: "${ctx}/qd/upload", swf: "${ctxStatic}/scripts/webuploader/uploader.swf", filetypes: "" });
			        //$(".upload-video").InitUploader({ type:'course', filesize: "", sendurl: "${ctx}/qd/upload", swf: "${ctxStatic}/scripts/webuploader/uploader.swf", filetypes: "" });
			        //$(".upload-course").InitUploader({ type:'course', btntext: "批量上传", multiple: true, water: true, thumbnail: true, filesize: "", sendurl: "${ctx}/qd/upload", swf: "${ctxStatic}/scripts/webuploader/uploader.swf" });
			      	//$(".upload-classroom").InitUploader({ type:'classroom', btntext: "批量上传", multiple: true, water: true, thumbnail: true, filesize: "", sendurl: "${ctx}/qd/upload", swf: "${ctxStatic}/scripts/webuploader/uploader.swf" });
					$(".upload-app").InitUploader({ type:'app', filesize: "", sendurl: "${ctx}/qd/upload", swf: "${ctxStatic}/scripts/webuploader/uploader.swf", filetypes: "*" });
			});
			
			function addImage(parentObj, data){
				if(data.type=='app'){
					$('#url').val(data.path);
				}
			}
		</script>
	</head>
	
	<body class="mainbody">
		<form:form id="inputForm" modelAttribute="appVersion" action="${ctx}/qd/app/save" method="post" class="form-horizontal">
			<form:hidden path="id"/>
			<!--导航栏-->
			<div class="location">
				<a href="${ctx}/qd/app/list" class="back"><i></i><span>返回列表页</span></a>
				<a href="${ctx}/center" class="home"><i></i><span>首页</span></a> 
				<i class="arrow"></i> 
				<a href="${ctx}/qd/app/"><span>版本控制</span></a>
				<shiro:hasPermission name="sys:app:edit"><i class="arrow"></i><span>${not empty AppVersion.id ? '修改':'添加' }版本</span></shiro:hasPermission>
			</div>	
			<div class="line10"></div>
			<!--/导航栏-->
	
			<!--内容-->
			<div id="floatHead" class="content-tab-wrap">
				<div class="content-tab">
					<div class="content-tab-ul-wrap">
						<ul>
							<li><a class="selected" href="javascript:;">早教中心信息</a></li>
						</ul>
					</div>
				</div>
			</div>
	
			<div class="tab-content">
				<dl>
					<dt>操作系统</dt>
					<dd>
						<div class="rule-multi-radio">
							<form:radiobutton path="os"  value="android" label="安卓系统"/>
							<form:radiobutton path="os"  value="ios" label="苹果系统"/>
						</div>
							<span class="Validform_checktip">*请选择操作系统</span>
					</dd>
				</dl>
				<dl>
					<dt>版本序号</dt>
					<dd>
						<form:input path="versionCode" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请输入版本序号（1）" errormsg="请输入版本序号（1）" sucmsg=" "/>
						<span class="Validform_checktip">*请输入版本序号（1）</span>
					</dd>
				</dl>
				<dl>
					<dt>显示版本号</dt>
					<dd>
						<form:input path="versionName" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请输入显示版本号（1.0.0）" errormsg="请输入显示版本号（1.0.0）" sucmsg=" "/>
						<span class="Validform_checktip">*请输入显示版本号（1.0.0）</span>
					</dd>
				</dl>
				<dl>
					<dt>版本描述</dt>
					<dd>
						<form:textarea  path="versionDesc" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请输入版本描述" errormsg="请输入版本描述" sucmsg=" "/>
						<span class="Validform_checktip">*请输入版本描述</span>
					</dd>
				</dl>
				<dl>
					<dt>正在使用</dt>
					<dd>
					    <div class="rule-multi-radio">
							<form:radiobuttons path="isUsing"  items="${fns:getDictList('yesno')}"  itemValue="value"  itemLabel="label" htmlEscape="false"  class="required" />
					    </div>
					</dd>
				</dl>
				<dl>
					<dt>强制更新</dt>
					<dd>
					    <div class="rule-multi-radio">
							<form:radiobuttons path="isForce"  items="${fns:getDictList('yesno')}"  itemValue="value"  itemLabel="label" htmlEscape="false"  class="required" />
					    </div>
					</dd>
				</dl>
				<dl>
					<dt>下载地址</dt>
					<dd>
						<form:input path="url" htmlEscape="false" maxlength="100"  cssClass="input normal upload-path" datatype="*"  nullmsg="请上传安装包" errormsg="请上传安装包" sucmsg=" "/>
						<div class="upload-box upload-app"></div>
						<span class="Validform_checktip">*请上传一个安装包</span>
					</dd>
				</dl>
			</div>
			<!--/内容-->
	
			<!--工具栏-->
			<div class="page-footer">
				<div class="btn-wrap">
					<input type="submit" name="btnSubmit" value="提交保存" id="btnSubmit" class="btn" /> 
					<input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript:history.back(-1);" />
				</div>
			</div>
			<!--/工具栏-->
		</form:form>
	</body>
</html>

